<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?>

<?php
// User is not allowed to see a price or there is no price
if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) {
	
	$link = $sess->url( $_SERVER['PHP_SELF'].'?page=shop.ask&amp;product_id='.$product_id.'&amp;subject='. urlencode( $VM_LANG->_('PHPSHOP_PRODUCT_CALL').": $product_name") );
	echo "<span class=\"ssmed_product_AskPrice\">";
	echo vmCommonHTML::hyperLink( $link, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') );
	echo "</span>";
	}

if( !empty( $price_info["product_price_id"] )) {
	echo "<div class=\"ssmed_productPrice\">";
	echo "<span class=\"ssmed_productPrice\">";
	echo $CURRENCY_DISPLAY->getFullValue($base_price);
	if (!empty($text_including_tax)) {
	echo "*";
	}
	echo "</span>";
	echo "</div>";
	echo "<span class=\"ssmed_productTax\">";
	if (!empty($text_including_tax)) {
	echo "*";
	}
	echo $text_including_tax;
	echo "</span>";
	}
	
echo $price_table;
?>


<?php
	
// DISCOUNT: Show old price!
if(!empty($discount_info["amount"])) {
	echo "<div id=\"ssmed_productOldPrice_box\">";
	echo "<div id=\"ssmed_productOldPrice\">";
	echo "<span class=\"ssmed_productOldPrice\">";
	echo $CURRENCY_DISPLAY->getFullValue($undiscounted_price); 
	echo "</span> ";
	echo "</div> ";
	}
// DISCOUNT: Show the amount the customer saves
if(!empty($discount_info["amount"])) {
	echo "<div id=\"ssmed_DiscountSave\">";
	echo "<span class=\"ssmed_DiscountSave\">";
	echo $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_SAVE').":&nbsp;";
	echo "</span>";
	echo "</div>";
if($discount_info["is_percent"]==1) {
		echo "<div id=\"ssmed_DiscountAmount\">";
		echo $discount_info["amount"]."%";
		echo "</div>";
	}
	else {
		echo "<div id=\"ssmed_DiscountAmount\">";
		echo $CURRENCY_DISPLAY->getFullValue($discount_info["amount"]);
		echo "</div>";
	}echo "</div>";	
}

?>